import {createAPI} from '@/utils/request'

const api = '/system/sys-permission'
export const list = data => createAPI(api + '/permissionList', 'get', data)
export const add = data => createAPI(api + '/add', 'post', data)
export const update = data => createAPI(api + '/edit', 'post', data)
export const remove = data => createAPI(api + '/delet', 'get', data)
export const detail = data => createAPI(api + '/info', 'get', data)
export const premAll = data => createAPI(api + '/permissionAll', 'get', data)
export const saveOrUpdate = data => {return data.id?update(data):add(data)}
